Median cut

Median cut is an algorithm to sort data of an arbitrary number of dimensions into series of sets by cutting each set of data at the median point.

Typically it is used to quantize graphics — e.g. to reduce a 64k-colour image to 256 colours, median cut is used to find the 256 colours that best match the original data. This can be seen in the Perl module Image-Pngslimmer (available on CPAN).

See also

External links